BINS = 32;

ch = load('../histogrami/Cit_6.txt');
xh = ch(:,1);
ch = ch(:,2);


xh2 = 1:BINS;
ch2 = zeros(BINS);

for i=1:BINS

    e = (xh2(i)./BINS)*(4);
    xh2(i)= 10^(-1+e);
    
end




for i=1:255
   
    j = floor(i/(256/BINS))+1;
    ch2(j) = ch2(j)+ch(i);
end
ch2(BINS) = ch2(BINS)+ch(256);

figure
clf
%ch = floor(ch(:,2)./10);
%h = ch.*10;
semilogx(xh2,ch2,'r');
hold on
semilogx(xh,ch,'b');

floor(ch2(:,1)/10);
